package com.itheima;

import java.util.ArrayList;

public class testff {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("迪丽热巴");
        //add(元素)
        list.add("古力娜扎");
        list.add("马尔扎哈");
        //add(索引,元素)
        list.add(0,"德玛西亚");
        //remove(元素)
        list.remove("马尔扎哈");
        //remove(索引)
        list.remove(0);
        //get(索引)
        System.out.println(list.get(0));
        //set(索引,元素)
        list.set(1,"柳岩");
        //打印集合list
        System.out.println(list);
        //长度size()
        System.out.println(list.size());
    }
}
